package com.jk.controller;

import com.jk.pojo.ConcludeBean;
import com.jk.service.ConcludeServcie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @ClassName ConcludeController
 * @Descripttion TODO 待处理签约和待处理服务Controller
 * @Author DELL
 * @Date 2022/10/13 19:17
 * @Version 0.001
 */
@RestController
@RequestMapping("conclude")
public class ConcludeController {

    @Autowired
    private ConcludeServcie concludeServcie;

    /**
    * @Author: binzi
    * @Description:查询签约
    * @Date: 2022/10/13 19:23
    * @Return: java.util.Map
    **/
    @RequestMapping("findConclude")
    public Map findConclude(ConcludeBean concludeBean){
        return concludeServcie.findConclude(concludeBean);
    }

    /**
    * @Author: binzi
    * @Description:新增MySql数据库同步到es中
    * @Date: 2022/10/14 10:12
    * @Return: boolean
    **/
    @RequestMapping("addConclude")
    public void addConclude(ConcludeBean concludeBean){
         concludeServcie.addConclude(concludeBean);
    }

    /**
    * @Author: binzi
    * @Description:根据Id（编号）查询数据
    * @Date: 2022/10/14 10:23
    * @Return: com.jk.pojo.ConcludeBean
    **/
    @RequestMapping("findConcludeById")
    public ConcludeBean findConcludeById(Integer conclude_id){
        return  concludeServcie.findConcludeById(conclude_id);
    }

    /**
    * @Author: binzi
    * @Description:根据Id删除对应的数据
    * @Date: 2022/10/14 10:33
    * @Return: boolean
    **/
    @RequestMapping("delConcludeById")
    public boolean  delConcludeById(Integer conclude_id){
        return concludeServcie.delConcludeById(conclude_id);
    }

    /**
    * @Author: binzi
    * @Description:查询当前时间的前七点数据
    * @Date: 2022/10/17 19:37
    * @Return: java.util.List<com.jk.pojo.ConcludeBean>
    **/
    @RequestMapping("findConcludeByDateWeed")
    public Map findConcludeByDateWeed(){
        return  concludeServcie.findConcludeByDateWeed();
    }

    /**
    * @Author: binzi
    * @Description:待处理服务量
    * @Date: 2022/10/18 10:29
    * @Return: java.util.Map
    **/
    @RequestMapping("findConcludeByStateCountTwo")
    public  Integer findConcludeByStateCountTwo(){
        return concludeServcie.findConcludeByStateCountTwo();
    }
}

